<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

return array(
    'controllers' => array(
        'invokables' => array(
            'Jhub1_Developer\Controller\Index' => 'Jhub1_Developer\Controller\IndexController'
        ),
    ),
    'session' => array(
        'remember_me_seconds' => 60,
        'use_cookies' => true,
        'cookie_httponly' => true,
    ),
    'router' => array(
        'routes' => array(
            'dev_home' => array(
                'type' => 'Zend\Mvc\Router\Http\Literal',
                'options' => array(
                    'route'    => '/developer',
                    'defaults' => array(
                        'controller' => 'Jhub1_Developer\Controller\Index',
                        'action'     => 'index',
                    ),
                ),
            ),
            //link to activate account from email
            'dev_activate' => array(
                'type' => 'segment',
                'options' => array(
                    'route'    => '/developer/activateaccount[/:code]',
                    'defaults' => array(
                        'controller' => 'Jhub1_Developer\Controller\Index',
                        'action'     => 'activate',
                    ),
                ),
            ),
            'dev_auth' => array(
                'type'    => 'segment',
                'options' => array(
                    'route'    => '/developer/authenticate[/:action]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*'
                    ),
                    'defaults' => array(
                        'controller' => 'Jhub1_Developer\Controller\Index',
                        'action'     => 'bla'
                    ),
                ),
            ),
        ),
    ),
    'service_manager' => array(
        'factories' => array(
            'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory',
        ),
    ),
    'controller_plugins' => array(
        'invokables' => array(
            'authCheck'  => 'Jhub1_Developer\Controller\Plugin\AuthenticationCheck'
        ),
    ),
    'translator' => array(
        'locale' => 'en_US',
        'translation_file_patterns' => array(
            array(
                'type'     => 'gettext',
                'base_dir' => __DIR__ . '/../language',
                'pattern'  => '%s.mo',
            ),
        ),
    ),
/*    'view_manager' => array(
        'display_not_found_reason' => true,
        'display_exceptions'       => true,
        'doctype'                  => 'HTML5',
        'not_found_template'       => 'error/404',
        'exception_template'       => 'error/index',
        'template_map' => array(
            'layout/layout'           => __DIR__ . '/../view/layout/layout.phtml',
            'jhub1_developer/index/index' => __DIR__ . '/../view/jhub1_developer/index/index.phtml',
            'error/404'               => __DIR__ . '/../view/error/404.phtml',
            'error/index'             => __DIR__ . '/../view/error/index.phtml',
        ),
        'template_path_stack' => array(
            __DIR__ . '/../view',
        ),
    ),*/
/*    'doctrine' => array(
        'driver' => array(
            'Jhub1_app_driver' => array(
                'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
                'cache' => 'array',
                'paths' => array(__DIR__ . '/../src/Application/Entity')
            ),
            'orm_default' => array(
                'drivers' => array(
                    'Application\Entity' => 'Jhub1_app_driver'
                )
            )
        )
    )*/
);
